import React, { PureComponent } from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import './style.scss';
import { actionCreators } from './store';

class VolitionPlan extends PureComponent {
    render() {
        const { volitionData } = this.props;
        return (
            <div className="volitionPlan">
               <div className="introduceImage">
                    <img src={volitionData.introduce_image} alt="" />
                </div>
            </div>
        )
    }

    componentDidMount() {
		// 获取 意志计划 数据
		this.props.acquireVolitionPlanData();
	}
}

const mapState = (state) => ({
	volitionData: state.volitionPlan? state.volitionPlan.volitionData: []
});

const mapDispatch = (dispatch) => ({
	acquireVolitionPlanData() {
		dispatch(actionCreators.acquireVolitionPlanData());
	}
});

export default connect(mapState, mapDispatch)(withRouter(VolitionPlan));